#ifndef UTILS
#define UTILS

#include <pthread.h>
#include <semaphore.h>

#include <queue>
#include <vector>
#include <chrono>
#include <ctime>

#include "model.h"

#define UTILS_DEBUG

void init_client_queue(std::queue<Client*>& c_queue, const char* data_file,
                       std::vector<Client*>& clients);
void init_worker(pthread_t* workers, int num_worker,
                std::queue<Client*>& waiting_queue, 
                std::queue<Client*>& clients,
                sem_t* sem, pthread_mutex_t* mutex);
void* worker(void* data);
void* queueing_client(void *queue);
void* get_queue_num(void* data);

#endif